package cn.stylefeng.guns.modular.api.model;

import cn.stylefeng.guns.modular.hp.model.PageContentInfo;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * 科室信息详情页信息传输类
 * @date 2019年5月24日
 * @author xingzq <250863062@qq.com></>
 */
public class DepartmentDetailsPageDTO {

    public final static String hospitalWebInfoStr = "http://www.hkhtcm.com.cn";

    public DepartmentDetailsPageDTO(){}

    public DepartmentDetailsPageDTO(String title, String authorName, PageContentInfo pageInfo){
        this.id = pageInfo.getId();
        this.title = title == null ? "" : title;
        this.content = pageInfo.getContent();
        this.author = authorName;
        this.createTime = pageInfo.getCreatedTime();
        this.hospitalWebUrl = DepartmentDetailsPageDTO.hospitalWebInfoStr;
    }

    @ApiModelProperty("主键ID")
    private String id;

    @ApiModelProperty("文章标题")
    private String title;

    @ApiModelProperty("详情内容")
    private String content;

    @ApiModelProperty("作者")
    private String author;

    @ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    @ApiModelProperty("医院首页地址")
    private String hospitalWebUrl;

    @ApiModelProperty("文章详情所属的模块ID")
    private String modelCode;

    @ApiModelProperty("文章详情所属模块的访问链接")
    private String modelListUrl;

    @ApiModelProperty("科室专家列表")
    private List<ExpertDTO> expertList;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getHospitalWebUrl() {
        return hospitalWebUrl;
    }

    public void setHospitalWebUrl(String hospitalWebUrl) {
        this.hospitalWebUrl = hospitalWebUrl;
    }

    public String getModelCode() {
        return modelCode;
    }

    public void setModelCode(String modelCode) {
        this.modelCode = modelCode;
    }

    public String getModelListUrl() {
        return modelListUrl;
    }

    public void setModelListUrl(String modelListUrl) {
        this.modelListUrl = modelListUrl;
    }

    public List<ExpertDTO> getExpertList() {
        return expertList;
    }

    public void setExpertList(List<ExpertDTO> expertList) {
        this.expertList = expertList;
    }
}
